const mongoose = require('mongoose')
const { BASE_URL } = require('./account')

mongoose.pluralize(null) // 去掉s 每次建数据库的时候 mongoose会在数据库后面自动加个s

mongoose.connect(BASE_URL)
  .then(res => {
    console.log('数据库连接成功')
  })
  .catch(err => {
    console.log('数据库连接失败')
  })

module.exports = mongoose